package cn.xmkeshe.dao;

import cn.xmkeshe.model.Fleet;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface IFleetDao {

  @Insert("insert into fleet(name,introduction,datetime)VALUES(#{name},#{introduction},#{datetime})")
  public boolean doCreate(Fleet fleet);

  @Select("SELECT * from fleet")
  public List<Fleet> findAll();

  @Update("update fleet set name = #{name},introduction = #{introduction} where fleetid = #{fleetid}")
  public boolean editFleet(@Param("introduction")String introduction, @Param("name")String name,@Param("fleetid")int fleetid);
}
